package com.homework;


/**
 * @author :  DongZheng Wang
 * @PROJECT_NAME: java泛型
 * @date :  2022-10-25 16:27
 **/
public class Three {
    public static void main(String[] args) {
        Threes<String> ob = new Threes<>();//因为不知道方法里面需要什么类型的类型所以使用的通配符
        ob.setValue("hello world");
        System.out.println(ob);
    }
    public static void fun(Threes<?> threes){
        System.out.println("================================"+threes);
    }
}
class Threes<T>{
    private T value;

    public T getValue() {
        return value;
    }

    public void setValue(T value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return "Threes{" +
                "value=" + value +
                '}';
    }
}


